package com.example.demo.Controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@RequestMapping("/user")
@Component
@ResponseBody
public class UserController {

    private static Logger logger= LoggerFactory.getLogger(UserController.class);

    @RequestMapping("/hi")
    public String hello()
    {
        logger.trace("我是trace");
        logger.debug("我是debug");
        logger.info("我是info");
        logger.warn("我是warn");
        logger.error("我是error");
        return "hello SpringBoot";
    }
}
